package com.wsclient;

import cn.edu.usts.service.serviceimpl.User;
import cn.edu.usts.service.serviceimpl.UserServiceImpl;
import cn.edu.usts.service.serviceimpl.UserServiceImplService;

public class app {
    public static void main(String[] args) {

        /**
         * wsdl：<service name = "UserServiceImplService">
         * <service name="UserServiceImplService">
         *      <port name="UserServiceImplPort" binding="tns:UserServiceImplPortBinding">
         *              <soap12:address location="http://127.0.0.1:8081/ws/userService"/>
         *      </port>
         * </service>
         */
        UserServiceImplService has = new UserServiceImplService();

        /**
         *wsdl:<port name="UserServiceImplPort" bind="tns:UserServiceImplPortBinding">
         */
        UserServiceImpl soap = has.getUserServiceImplPort();
        User user1 = soap.queryUser(2);
//        System.out.println(user1);
        System.out.println(user1.getName());
    }
}
